/**
* @Title: Util.java   
* @Copyright 2010 -2013 CreativeWise
* @Package com.util   
* @Description:    
* @author wangxinmin    
* @date 2013-12-27 上午11:32:20   
* @version V1.0 
*/
package com.util.sendmsg;

import java.util.Map;

import com.cloopen.rest.sdk.CCPRestSmsSDK;

public class SendMsg{
	
	public static String transmitSMS(String telephone,String code,String overTime) {
		String result="success";
		//初始化SDK
		CCPRestSmsSDK restAPI = new CCPRestSmsSDK();
		restAPI.init("app.cloopen.com", "8883");
		restAPI.setAccount("aaf98f894a038dc2014a134bba230ae5", "8dcabf976e3f46dca8ff501157f3e85c");
		restAPI.setAppId("aaf98f894ac24cc7014ac7b09c4402f0");
		
		Map<String,Object> resultMap = restAPI.sendTemplateSMS(telephone,"11031" ,new String[]{code,overTime});
		
		System.out.println("SDKTestGetSubAccounts result=" + result);
		if(!"000000".equals(resultMap.get("statusCode"))){
			result=(String)resultMap.get("statusMsg");
		}
		return result;
	}
}
